package com.ticket.sass.admin.dto.output;

import com.ticket.sass.common.entity.tenant.TicketCheckConfigEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author ywb
 * @date 2024-04-14 19:00
 */
@Data
@ApiModel
public class TicketCheckConfigOutput {
    @ApiModelProperty(value = "是否只能电子检票")
    private Boolean only;
    
    @ApiModelProperty(value = "是否推荐（is_only=false时使用）")
    private Boolean recommend;
    
    @ApiModelProperty(value = "是否默认显示（is_only=false时使用）")
    private Boolean enableDefault;
    
    public TicketCheckConfigOutput() {
        this.only = Boolean.FALSE;
        this.recommend = Boolean.FALSE;
        this.enableDefault = Boolean.FALSE;
    }
    
    public TicketCheckConfigOutput(TicketCheckConfigEntity entity) {
        only = entity.getIsOnly();
        recommend = entity.getIsRecommend();
        enableDefault = entity.getIsDefault();
    }
}
